<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>班级列表</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <!-- Bootstrap 3.3.7 -->
    <!--link导入外部的css，js样式，如果导入的资源和本页面在同一个文件夹下，直接文件名即可-->
    <link rel="stylesheet" th:href="@{/asserts/bower_components/bootstrap/dist/css/bootstrap.min.css}">
    <!-- jQuery 3 -->
    <script th:src="@{/asserts/bower_components/jquery/dist/jquery.min.js}"></script>
    <!-- Bootstrap 3.3.7 -->
    <script th:src="@{/asserts/bower_components/bootstrap/dist/js/bootstrap.min.js}"></script>
    <!-- Font Awesome -->
    <link rel="stylesheet" th:href="@{/asserts/bower_components/font-awesome/css/font-awesome.min.css}">
    <!-- Ionicons -->
    <link rel="stylesheet" th:href="@{/asserts/bower_components/Ionicons/css/ionicons.min.css}">
    <!-- DataTables -->
    <link rel="stylesheet" th:href="@{/asserts/bower_components/datatables.net-bs/css/dataTables.bootstrap.min.css}">
    <!-- Theme style -->
    <link rel="stylesheet" th:href="@{/asserts/dist/css/AdminLTE.min.css}">
    <!--MySources-->
    <script th:src="@{/asserts/Apolar_sh/lib/layer/2.4/layer.js}"></script>
    <script th:src="@{/asserts/Apolar_sh/lib/js/bigautocomplete.js}"></script>
    <link rel="stylesheet" th:href="@{/asserts/Apolar_sh/lib/css/bigautocomplete.css}" type="text/css"/>

    <!-- Google Font -->
    <link rel="stylesheet"
          href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">

    <style type="text/css">
        * {
            margin: 0;
            padding: 0;
        }

        .search {
            margin-top: 40px;
            margin-left: 40px;
            position: relative;
        }

        #myTable td {
            text-align: center;
        }

        th {
            text-align: center;
        }

        #top{
            background-color: rgba(172, 175, 175, 0.78);
            display: none;
            position: fixed;
            right: -3px;
            bottom: 45px;
            z-index: 9999;
        }
        #top a{
            color: rgba(61, 61, 61, 0.91);
            font-size: 45px;
        }


        #home {
            display: block;
            position: absolute;
            right: 10px;
            top: 8px;
            z-index: 9;
            font-size: 30px;
        }

        #refresh {
            display: block;
            position: absolute;
            right: 46px;
            top: 10px;
            z-index: 9;
            font-size: 26px;
        }
    </style>
</head>
<body>
<a id="up"></a>
<div id="top" >
    <a href="#up" title="回到顶部" class="fa fa-angle-double-up"></a>
</div>

<span>
    <a id="refresh" class="fa fa-refresh"  href="javascript:location.reload()"></a>
    <a id="home" class="fa fa-home" th:href="@{/stu/stuShow(classId=${classId},currentPage=${currentPage},currentPageSize=${currentPageSize})}"></a>
</span>
<div class="wrapper">
    <!-- Content Wrapper. Contains page content -->
    <!-- Content Header (Page header) -->
    <!-- Main content -->
    <section class="content-header">
        <h4>
            <i class="fa fa-search"></i> 搜索学生详情列表
        </h4>
    </section>

    <div class="search" style="margin-top: 0;width: 100%">
        <div class="row" style="margin-top: 0;width: 100%">
            <div class="col-xs-7" style="margin-left: 13%;margin-top: 0;width: 100%">
                <form class="form-inline" id="SearchForm" th:action="@{/stu/stuSearchShow(classId=${classId},currentPage=${currentPage},classDate=${classDate},tName=${classTeacher},mName=${classHeadTeacher},sName=${classType})}"
                      method="post">
                    <span class="form-group">
                        <label>姓名：</label>
                        <input id="scSName" th:if="${sc}==null" style="width: 160px;" type="text"
                               class="form-control input-sm"
                               name="scSName"
                               placeholder="请输入学生姓名">
                        <input id="scSName" th:if="${sc}!=null" style="width: 160px;" type="text"
                               class="form-control input-sm"
                               name="scSName"
                               placeholder="请输入学生姓名" th:value="${sc.scSName}">
                    </span>&nbsp;&nbsp;&nbsp;&nbsp;
                    <span class="form-group">
                        <label>学历：</label>
                        <input id="scSEducation" th:if="${sc}==null" style="width: 130px;" type="text"
                               class="form-control input-sm"
                               name="scSEducation"
                               placeholder="请输入学生学历"
                               onchange="if(/[\d]/g.test(value)){layer.msg('格式不对哦!请输入字母或中文', {icon: 0, time: 1500});value='';}">
                        <input id="scSEducation" th:if="${sc}!=null" style="width: 130px;" type="text"
                               class="form-control input-sm"
                               name="scSEducation"
                               placeholder="请输入学生学历" th:value="${sc.scSEducation}"
                               onchange="if(/[\d]/g.test(value)){layer.msg('格式不对哦!请输入字母或中文', {icon: 0, time: 1500});value='';}">
                    </span>&nbsp;&nbsp;&nbsp;&nbsp;
                    <span class="form-group">
                        <label>身份证：</label>
                        <input id="scSIdCard" th:if="${sc}==null" style="width: 130px;" type="text"
                               class="form-control input-sm"
                               name="scSIdCard"
                               placeholder="请输入学生身份证号"
                               onchange="if(/\D/.test(value)){layer.msg('格式不对哦!请输入数字', {icon: 0, time: 1500});value='';}">
                        <input id="scSIdCard" th:if="${sc}!=null" style="width: 130px;" type="text"
                               class="form-control input-sm"
                               name="scSIdCard"
                               placeholder="请输入学生身份证号" th:value="${sc.scSIdCard}"
                               onchange="if(/\D/.test(value)){layer.msg('格式不对哦!请输入数字', {icon: 0, time: 1500});value='';}">
                    </span>&nbsp;&nbsp;&nbsp;&nbsp;
                    <a id="submitBtn" th:onclick="submit()" class="btn btn-success btn-sm"><i class="fa fa-search"></i>
                        一键搜索
                    </a>
                </form>
            </div>
            <!-- /.col -->
        </div>
        <!-- /.row -->
    </div>
    <!-- /.content -->
</div>

<div class="wrapper">
    <!-- Content Wrapper. Contains page content -->
    <!-- Content Header (Page header) -->
    <section class="content-header" style="padding-top: 0;padding-bottom: 2px;">
        <h4>
            <i class="fa fa-navicon"></i> 学生详情列表
            <span style="margin: 0 0 0 81%;">
            <a th:if="${classDate==null&&classTeacher==null&&classHeadTeacher==null&&classType==null}" th:href="@{/career/findAll(currentPage=${currentPage})}" class="btn btn-info btn-sm"><i
                    class="fa fa-backward"></i> 返回</a>
            <a th:if="${classDate!=null||classTeacher!=null||classHeadTeacher!=null||classType!=null}" th:href="@{/career/searchClass(currentPage=${currentPage},startTime=${classDate},tName=${classTeacher},mName=${classHeadTeacher},sName=${classType})}" class="btn btn-info btn-sm"><i
                    class="fa fa-backward"></i> 返回</a>
        </span>
        </h4>
    </section>

    <!-- Main content -->
    <section class="content" style="padding-top: 0;">
        <div class="row">
            <div class="col-xs-12">
                <div class="box">
                    <div th:if="${info!=null}" class="box-body" style="color: red;font-size: 20px;">
                        [[${info}]]
                    </div>
                    <!-- /.box-header 部门列表的显示  table  表格  th/td单元个   th字体加粗，行标题-->
                    <div th:if="${info==null}" class="box-body">
                        <table id="myTable" class="table table-bordered table-striped">
                            <thead>
                            <tr>
                                <th>班级</th>
                                <th>姓名</th>
                                <th>性别</th>
                                <th>学校名称</th>
                                <th>专业</th>
                                <th>外语水平</th>
                                <th>证书</th>
                                <th>学历</th>
                                <th>毕业时间</th>
                                <th>移动电话</th>
                                <th>招生老师</th>
                                <th>学生详情</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr th:each="student:${stuList}">
                                <td>[[${student.cId}]]</td>
                                <td>[[${student.sName}]]</td>
                                <td>[[${student.sGender==0?'':student.sGender==1?'男':'女'}]]</td>
                                <td>[[${student.sSchoolName}]]</td>
                                <td>[[${student.sMajor}]]</td>
                                <td>[[${student.sCet}]]</td>
                                <td>[[${student.sCertificate}]]</td>
                                <td>[[${student.sEducation}]]</td>
                                <td>[[${#dates.format(student.sGradtime, 'yyyy-MM-dd')}]]</td>
                                <td>[[${student.sSelfTel}]]</td>
                                <td>[[${student.sRecruiter}]]</td>
                                <td>
                                    <a class="btn btn-info btn-sm" data-toggle="modal"
                                       th:data-target="${'#info'+student.sId}">
                                        <i class="fa fa-info"></i> 查看详情
                                    </a>
                                    <!-- Modal -->
                                    <div class="modal fade " th:id="${'info'+student.sId}" tabindex="-1" role="dialog"
                                         aria-labelledby="myModalLabel">
                                        <div class="modal-dialog modal-lg" role="document">
                                            <div class="modal-content">
                                                <div class="modal-header">
                                                    <button type="button" class="close" data-dismiss="modal"
                                                            aria-label="Close"><span aria-hidden="true">&nbsp;&nbsp;&times;&nbsp;&nbsp;</span>
                                                    </button>
                                                    <h4 class="modal-title" id="myModalLabel"><i class="fa fa-info"></i>
                                                        学生详情</h4>
                                                </div>
                                                <div class="modal-body">
                                                    <table class="table table-striped table-bordered">
                                                        <tbody>
                                                        <tr>
                                                            <td>
                                                                <strong>班级:</strong>
                                                            </td>
                                                            <td style="word-break:break-all;"
                                                                colspan="3">
                                                                [[${student.cId}]]
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td><strong>姓名:</strong>
                                                            </td>
                                                            <td>
                                                                [[${student.sName}]]
                                                            </td>
                                                            <td><strong>性别:</strong>
                                                            </td>
                                                            <td>
                                                                [[${student.sGender==0?'':student.sGender==1?'男':'女'}]]
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                <strong>学校名称:</strong>
                                                            </td>
                                                            <td>
                                                                [[${student.sSchoolName}]]
                                                            </td>
                                                            <td><strong>专业:</strong>
                                                            </td>
                                                            <td>
                                                                [[${student.sMajor}]]
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                <strong>外语水平:</strong>
                                                            </td>
                                                            <td>
                                                                [[${student.sCet}]]
                                                            </td>
                                                            <td><strong>证书:</strong>
                                                            </td>
                                                            <td>
                                                                [[${student.sCertificate}]]
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td><strong>学历:</strong>
                                                            </td>
                                                            <td>
                                                                [[${student.sEducation}]]
                                                            </td>
                                                            <td>
                                                                <strong>毕业时间:</strong>
                                                            </td>
                                                            <td>
                                                                [[${#dates.format(student.sGradtime, 'yyyy-MM-dd')}]]
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                <strong>移动电话:</strong>
                                                            </td>
                                                            <td>
                                                                [[${student.sSelfTel}]]
                                                            </td>
                                                            <td>
                                                                <strong>QQ号码:</strong>
                                                            </td>
                                                            <td>[[${student.sQq}]]
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                <strong>身份证号:</strong>
                                                            </td>
                                                            <td>
                                                                [[${student.sIdCard}]]
                                                            </td>
                                                            <td>
                                                                <strong>家长电话:</strong>
                                                            </td>
                                                            <td>
                                                                [[${student.sParentTel}]]
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                <strong>家庭现住址:</strong>
                                                            </td>
                                                            <td style="word-break:break-all;"
                                                                colspan="3">
                                                                [[${student.sAddress}]]
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td><strong>邮箱:</strong>
                                                            </td>
                                                            <td>
                                                                [[${student.sEmail}]]
                                                            </td>
                                                            <td>
                                                                <strong>招生老师:</strong>
                                                            </td>
                                                            <td>
                                                                [[${student.sRecruiter}]]
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td><strong>备注:</strong>
                                                            </td>
                                                            <td style="word-break:break-all;"
                                                                colspan="3">
                                                                [[${student.sRemark}]]
                                                            </td>
                                                        </tr>
                                                        </tbody>
                                                    </table>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <!-- /.box-body -->
                </div>
                <!-- /.box -->
            </div>
            <!-- /.col -->
        </div>
        <!-- /.row -->
    </section>
    <!-- /.content -->
</div>
<!-- ./wrapper -->

<!-- DataTables -->
<script th:src="@{/asserts/bower_components/datatables.net/js/jquery.dataTables.min.js}"></script>
<script th:src="@{/asserts/bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js}"></script>
<!-- SlimScroll -->
<script th:src="@{/asserts/bower_components/jquery-slimscroll/jquery.slimscroll.min.js}"></script>
<!-- FastClick -->
<script th:src="@{/asserts/bower_components/fastclick/lib/fastclick.js}"></script>
<!-- AdminLTE App -->
<script th:src="@{/asserts/dist/js/adminlte.min.js}"></script>
<!-- AdminLTE for demo purposes -->
<script th:src="@{/asserts/dist/js/demo.js}"></script>
<script>

    /*置顶*/
    $(function () {
        $(window).scroll(function () {
            if ($(window).scrollTop() > 150) {
                $('#top').css('display','block');    //<div id-'top'></div>假如有这么个div是那个向上图标的div。css默认none
            } else {
                $('#top').css('display','none');
            }
        });
    });
    /*联想输入*/
    $(function () {
        $("#scSName").bigAutocomplete({
            url: '[[${#httpServletRequest.getContextPath()}]]/find/allStusJson?classId='+[[${classId}]],
        });
    })
    function submit() {
        var sName = $("#scSName").val();
        var sEducation = $("#scSEducation").val();
        var sIdCard = $("#scSIdCard").val();
        if ((sName == null || sName === "") && (sEducation == null || sEducation === "") && (sIdCard == null || sIdCard === "")) {
            layer.msg('亲，查询内容不能为空哦!', {
                icon: 0,
                time: 1500
            });
        } else {
            $("#SearchForm").submit();
        }
    }
</script>
</body>
</html>